***Full-Power Cabinets and Caretaker Administrations in Parliamentary Democracies, 1945-2024***
***Francesco Bromo and José A. Cheibub***
***15 July 2025***

**Table A6: Survival Analysis of Caretaker Periods

*Load dataset
use "formation_data.dta", clear

xtset country_number event_date

replace country_number=31 if country=="Australia"
replace country_number=1 if country=="Slovenia"

gen formation_days_surv=formation_days+1

egen id_year=group(event_year)

mkspline year_spline = id_year, cubic

stset formation_days_surv, failure(form_died)

*Column 1, column 4 (Whole Sample)
stcox i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number 
xtstreg i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number, d(weibull) time tratio 

*Column 2, column 5 (Established Democracies)
preserve
keep if europe!=2
stcox i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number
xtstreg i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number, d(weibull) time tratio 
restore

*Column 3, column 6 (Eastern Europe)
preserve
keep if europe==2
stcox i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number
xtstreg i.investiture i.post_elec c.enp c.sd_rile c.enp#i.post_elec c.sd_rile#i.post_elec year_spline* i.country_number, d(weibull) time tratio 
restore
